<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="../../css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
        .layui-input, .layui-textarea{
            width: 45% !important;
        }
        .layui-unselect , .layui-form-select{
            width: 45% !important;
        }
        .layui-select-title input{
            width: 100% !important;
        }
        .layui-form-select .layui-input {
            padding-right: 30px;
            cursor: pointer;
        }
        .yellowBg{
            background: #faffbd;
        }
        #cancelBtn{
            z-index: 99;
        }
    </style>
</head>
<body>
<div class="layui-form layuimini-form" >
    <div class="layui-form-item" >
        <div >
            <label class="layui-form-label required">审批意见：</label>
            <div class="layui-input-block">
                <input type="text"  id="opinions"   value="" readonly class="layui-input js_val">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block" id="result">

        </div>
    </div>
    <iframe  style="width: 100%;height: 800px; border: none;display: none" id="bpage" >
    </iframe>
<!--    <iframe src="" id="businessPage"></iframe>-->
</div>
<script src="../../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="../../lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
<script src="../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>

    function child(obj){
        ids = obj.id;
        $("#result").append(obj.result == '1' ?
            ('  <button class="layui-btn layui-btn-normal">通过</button>') :
            (
                obj.result == '0'?
                    ('  <button class="layui-btn layui-btn-danger">拒绝</button>' ):
                    ('  <button class="layui-btn layui-btn-warm">待审批</button>' )
            )
        );
        if(obj.description){
            let iframe = document.getElementById('bpage');
            iframe.src = obj.description;
            iframe.style = 'width: 100%;height: 800px; border: none;';
        }
        $("#opinions").val(obj.opinions);
    }

</script>
</body>
</html>